package cn.com.cym.gamezao.repository.xmu;

import cn.com.cym.gamezao.base.BaseRepository;
import cn.com.cym.gamezao.entity.authorize.User;
import cn.com.cym.gamezao.entity.xmu.Recruit;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@RedisHash
@Repository
public interface RecruitRepository  extends BaseRepository<Recruit,Long> {

    @Query(value = "from Recruit where cardType=:cardType and cardNo=:cardNo")
    List<Recruit> findByCardTypeAndCardNo(@Param("cardType") String cardType, @Param("cardNo") String cardNo);

    List<Recruit> findByUser(User user);
}
